package cn.stylefeng.guns.modular.controller;

import cn.stylefeng.guns.modular.model.result.StanbdersDataDict;
import cn.stylefeng.guns.modular.service.CheckStandersDataService;
import cn.stylefeng.roses.kernel.model.response.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/standers")
public class CheckStandersData {

    @Autowired
    CheckStandersDataService checkStandersDataService;


    private String PREFIX = "/standers/data/";

    @RequestMapping("")
    public String index() {
        return PREFIX + "data.html";
    }

    @RequestMapping("/list")
    public ResponseData list() {
        List<StanbdersDataDict> list = this.checkStandersDataService.standersDataDictList();
        return ResponseData.success(list);

    }
}
